package com.p2p.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.p2p.common.DTO.LoanDTO;
import com.p2p.common.base.RespResult;
import com.p2p.entity.Loan;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LoanMapper extends BaseMapper<Loan> {

List<LoanDTO>   selectAllLoanList(@Param("page") Page<LoanDTO> page);
List<LoanDTO> selectLoanByConditionList(@Param("page") Page<LoanDTO> page,
                                        @Param("title") String title,
                                        @Param("borrower") String borrower,
                                        @Param("phoneNum") String phoneNum,
                                        @Param("loanStatus") Byte loanStatus);


int addMaterialImg(@Param("imgPath") String imgPath, @Param("id") Long id);

int addLoanInfoImg(@Param("imgPath") String imgPath, @Param("id") Long id);


}
